package com.example.blogback.service;

import com.example.blogback.entity.User;
import org.springframework.security.core.userdetails.UserDetailsService;

public interface UserService extends UserDetailsService {
    User findByUsername(String username);
    boolean validatePassword(String rawPassword, String encodedPassword);
    
    // 发送重置密码验证码
    void sendResetPasswordCode(String username);
    
    // 使用验证码重置密码
    void resetPassword(String username, String code, String newPassword);

    // 检查用户是否具有指定权限
    boolean hasPermission(String username, String permission);
}